package com.example.myapplication.HomePage;


import com.example.myapplication.Action.ActionDemoActivity;
import com.example.myapplication.AlertDialogActivity;
import com.example.myapplication.BreakpointDebuggiActivity;
import com.example.myapplication.ButtonActivity;
import com.example.myapplication.CanvasSignature.CanvasSignatureActivity;
import com.example.myapplication.Connector.ConnectorActivity;
import com.example.myapplication.ConstraintLayoutActivity;
import com.example.myapplication.CustomToastActivity;
import com.example.myapplication.CustomWidget.CustomWidgetActivity;
import com.example.myapplication.EditTextActivity;
import com.example.myapplication.FrameAnimationActivity;
import com.example.myapplication.FrameLayoutActivity;
import com.example.myapplication.GridLayoutActivity;
import com.example.myapplication.ImageActivity;
import com.example.myapplication.JumpActivity;
import com.example.myapplication.LinearLayoutMainActivity;
import com.example.myapplication.MainActivity;
import com.example.myapplication.NotificationActivity;
import com.example.myapplication.Notifition2Activity;
import com.example.myapplication.PopupWindowActivity;
import com.example.myapplication.PreferencesScreen.PreferencesScreenActivity;
import com.example.myapplication.ProgressBarActivity;
import com.example.myapplication.PropertyAnimationActivity;
import com.example.myapplication.RelativeLayoutActivity;
import com.example.myapplication.RetrofitDemo.RetrofitActivity;
import com.example.myapplication.Room.RoomSQLIstActivity;
import com.example.myapplication.RxJava.RxJavaActivity;
import com.example.myapplication.SQLite.SQLiteActivity;
import com.example.myapplication.SdkUse.SdkUseActivity;
import com.example.myapplication.SharedPreferencesActivity;
import com.example.myapplication.StylesAndThemesActivity;
import com.example.myapplication.TableLayoutActivity;
import com.example.myapplication.ToolBarActivity;
import com.example.myapplication.TouchDemo.TouchDemoActivity;
import com.example.myapplication.TweenAnimationActivity;
import com.example.myapplication.ViewPageFragment.ViewPageFragmentActivity;
import com.example.myapplication.WebView.WebViewActivity;
import com.example.myapplication.asyncTaskDemo.AsyncTaskDemoActivity;
import com.example.myapplication.blue.BlueToothActivity;
import com.example.myapplication.communication.CommunicationActivity;
import com.example.myapplication.fragment.FragmentActivity;
import com.example.myapplication.galleryfinal.GalleryfinalActivity;
import com.example.myapplication.handlerDemo.HandlerDemoActivity;
import com.example.myapplication.handlerDemo.HandlerPostActivity;
import com.example.myapplication.intent.FirstActivity;
import com.example.myapplication.jump2Activity;
import com.example.myapplication.listview.ListViewActivity;
import com.example.myapplication.messenger.MessengerDemoActivity;
import com.example.myapplication.okHttp.OkHttpActivity;
import com.example.myapplication.recyclerview.RecyclerviewLayoutActivity;
import com.example.myapplication.service.BindingActivity;
import com.example.myapplication.service.IntentServiceActivity;
import com.example.myapplication.service.ServiceActivity;
import com.example.myapplication.storage.ExternalStorageActivity;
import com.example.myapplication.viewpage.ViewPagerActivity;

import java.util.ArrayList;
import java.util.List;

public class DataHolder {
    private static List<HomePageBean> date = new ArrayList<>();

    // 初始化初始数据
    public static void initializeData() {
        // 清空之前的数据
        date.clear();
        addData("WebView使用", WebViewActivity.class.getName());
        addData("SDK的封装使用", SdkUseActivity.class.getName());
        addData("画布签名", CanvasSignatureActivity.class.getName());
        addData("图库Activity", GalleryfinalActivity.class.getName());
        addData("动作演示页面", ActionDemoActivity.class.getName());
        addData("异步任务演示页面", AsyncTaskDemoActivity.class.getName());
        addData("蓝牙页面", BlueToothActivity.class.getName());
        addData("通讯页面", CommunicationActivity.class.getName());
        addData("连接器页面", ConnectorActivity.class.getName());
        addData("自定义小部件页面", CustomWidgetActivity.class.getName());
        addData("片段页面", FragmentActivity.class.getName());
        addData("处理程序演示页面", HandlerDemoActivity.class.getName());
        addData("处理程序发布页面", HandlerPostActivity.class.getName());
        addData("第一个页面", FirstActivity.class.getName());
        addData("滚动列表页", ListViewActivity.class.getName());
        addData("信使演示页面", MessengerDemoActivity.class.getName());
        addData("OkHttp页面", OkHttpActivity.class.getName());
        addData("首选项屏幕页面", PreferencesScreenActivity.class.getName());
        addData("回收视图布局页面", RecyclerviewLayoutActivity.class.getName());
        addData("Retrofit页面", RetrofitActivity.class.getName());
        addData("RoomSQL页面", RoomSQLIstActivity.class.getName());
        addData("RxJava页面", RxJavaActivity.class.getName());
        addData("MyServer页面", ServiceActivity.class.getName());
        addData("IntentServer页面", IntentServiceActivity.class.getName());
        addData("BindingServer页面", BindingActivity.class.getName());
        addData("SQLite页面", SQLiteActivity.class.getName());
        addData("外部存储页面", ExternalStorageActivity.class.getName());
        addData("触摸演示页面", TouchDemoActivity.class.getName());
        addData("视图页页面", ViewPagerActivity.class.getName());
        addData("视图页片段页面", ViewPageFragmentActivity.class.getName());
        addData("警报对话框页面", AlertDialogActivity.class.getName());
        addData("断点调试页面", BreakpointDebuggiActivity.class.getName());
        addData("按钮页面", ButtonActivity.class.getName());
        addData("约束布局页面", ConstraintLayoutActivity.class.getName());
        addData("自定义提示页面", CustomToastActivity.class.getName());
        addData("编辑文本页面", EditTextActivity.class.getName());
        addData("帧动画页面", FrameAnimationActivity.class.getName());
        addData("帧布局页面", FrameLayoutActivity.class.getName());
        addData("网格布局页面", GridLayoutActivity.class.getName());
        addData("图片页面", ImageActivity.class.getName());
        addData("跳转2页面", jump2Activity.class.getName());
        addData("跳转页面", JumpActivity.class.getName());
        addData("线性布局主页面", LinearLayoutMainActivity.class.getName());
        addData("主页", MainActivity.class.getName());
        addData("通知页面", NotificationActivity.class.getName());
        addData("通知2页面", Notifition2Activity.class.getName());
        addData("弹出窗口页面", PopupWindowActivity.class.getName());
        addData("进度条页面", ProgressBarActivity.class.getName());
        addData("属性动画页面", PropertyAnimationActivity.class.getName());
        addData("相对布局页面", RelativeLayoutActivity.class.getName());
        addData("共享首选项页面", SharedPreferencesActivity.class.getName());
        addData("样式和主题页面", StylesAndThemesActivity.class.getName());
        addData("表格布局页面", TableLayoutActivity.class.getName());
        addData("工具栏页面", ToolBarActivity.class.getName());
        addData("Tween动画页面", TweenAnimationActivity.class.getName());
    }


    public static List<HomePageBean> getDate() {
        return date;
    }

    public static void setDate(List<HomePageBean> newData) {
        date = newData;
    }

    // 添加数据的方法
    public static void addData(String name, String page) {
        HomePageBean bean = new HomePageBean();
        bean.setName(name);
        bean.setPage(page);
        date.add(bean);
    }

    public static void clearData() {
        date.clear();
    }
}

